package com.bungarus.group.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * Created by tang on 2018/12/2.
 */
@Configuration
@ComponentScan(basePackages = {"com.bungarus.group.model", "com.bungarus.group.service",
        "com.bungarus.group.jdbc", "com.bungarus.group.cachestore", "com.bungarus.ratelimit"})
@EnableJpaRepositories(basePackages = "com.bungarus.group.repo")
public class BungarusGroupConfig {
    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }
}
